import request from '@/utils/request'

// 查询发票申请列表
export function listInvoice(query) {
  return request({
    url: '/course/invoice/list',
    method: 'get',
    params: query
  })
}

// 查询发票申请所有列表
export function listAllInvoice(query) {
  return request({
    url: '/course/invoice/listAll',
    method: 'get',
    params: query
  })
}

// 查询发票申请详细
export function getInvoice(id) {
  return request({
    url: '/course/invoice/getInfo/' + id,
    method: 'get'
  })
}

// 新增发票申请
export function addInvoice(data) {
  return request({
    url: '/course/invoice/add',
    method: 'post',
    data: data
  })
}

// 修改发票申请
export function updateInvoice(data) {
  return request({
    url: '/course/invoice/edit',
    method: 'post',
    data: data
  })
}

// 删除发票申请
export function delInvoice(id) {
  return request({
    url: '/course/invoice/remove/' + id,
    method: 'get'
  })
}

// 查询我的发票申请记录列表
export function myInvoiceList() {
  return request({
    url: '/course/invoice/myList',
    method: 'get'
  })
}